import { Component, OnInit, Input } from '@angular/core';
import { GoodService } from './../../vsp/bean';
import * as _ from 'lodash';
@Component({
  selector: 'gooddetail',
  templateUrl: './gooddetail.component.html',
  styleUrls: ['./gooddetail.component.css']
})
export class GooddetailComponent implements OnInit {

  @Input() goodid: string;
  tuwenlist: Array<any> = [];
  showtuwen: boolean = false;
  constructor(private goodService: GoodService) {

  }

  ngOnInit() {

  }
  public loadGoodDetail() {
    this.goodService.loadGoodDetail(this.goodid).subscribe((response) => {
      this.tuwenlist = response.data.images;
      this.showtuwen = true;
    }, (error) => {
      console.error(error);
    });
  }


}
